<table class="table table-hover">
    <thead>
        <tr>
            <th width="20%">姓名</th>
            <th width="50%">备注</th>
            <th width="30%">操作</th>
        </tr>
    </thead>
    <tbody>
        <% workers.forEach(function(worker){ %>
            <tr>
                <td>
                    <%= worker.name %>
                </td>
                <td>
                    <%= worker.remark %>
                </td>
                <td>
                    <a class="btn btn-xs btn-primary" href="/backend/worker/<%= worker.id %>">编辑</a>
                    <a class="btn btn-xs btn-warning" data-toggle="confirm" data-text-title="删除职位" data-text-message="确认删除职位「<%= worker.name %>」？<br>"
                    data-text-undo="取消" data-text-do="删除" data-success-mode="refresh" data-refresh-target="#WorkerList"
                    data-error-mode="alert" data-action="/backend/worker/<%= worker.id %>" data-method="delete">删除</a>
                </td>
            </tr>
            <% }) %>
    </tbody>
</table>
<div class="paginations" data-name="pageIndex" data-success-mode="refresh" data-refresh-target="#WorkerList">
    <div class="pagination pagination-gap pagesize">
        <li>
            <div class="input-group">
                <span class="input-group-addon">每页</span>
                <select name="pageSize" class="form-control">
                    <option value="10">10</option>
                    <option value="20">20</option>
                    <option value="50">50</option>
                </select>
                <span class="input-group-addon">条</span>
            </div>
        </li>
        <li class="disabled">
            <a href="#">
                <%= pageInfo.count %>条/
                    <%= pageInfo.totalPage %>页
            </a>
        </li>
    </div>
    <ul class="pagination pagination-gap pageindex">
        <li>
            <div class="input-group">
                <span class="input-group-addon">跳至</span>
                <input type="text" class="form-control" />
                <span class="input-group-addon">页</span>
            </div>
        </li>
        <% if(pageInfo.totalPage > 1 && pageInfo.pageIndex > 1){ %>
            <li data-value="<%= pageInfo.pageIndex - 1 %>">
                <a href="#" class="prev">
                上一页
            </a>
            </li>
            <% } %>
                <% for(var i=1;i<pageInfo.totalPage+1;i++){%>
                    <li class="<%= i == pageInfo.pageIndex?'active':' ' %>" data-value="<%= i %>">
                        <a href="#">
                            <%= i %>
                        </a>
                    </li>
                    <% } %>
                        <% if(pageInfo.totalPage > 1 && pageInfo.pageIndex < pageInfo.totalPage){ %>
                            <li data-value="<%= pageInfo.pageIndex + 1 %>">
                                <a href="#" class="next">
                下一页
            </a>
                            </li>
                            <% } %>
    </ul>
    <div class="clearfix"></div>
</div>